"use strict";
const common_vendor = require("../../../../../../../common/vendor.js");
const common_assets = require("../../../../../../../common/assets.js");
if (!Array) {
  const _easycom_up_text2 = common_vendor.resolveComponent("up-text");
  _easycom_up_text2();
}
const _easycom_up_text = () => "../../../../../../../node-modules/uview-plus/components/u-text/u-text.js";
if (!Math) {
  _easycom_up_text();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const activeStatus = common_vendor.ref("all");
    const abnormalBPLs = common_vendor.ref([{
      risklevel: "重度",
      uploadTime: "2024-05-19 17:18:00",
      systolic: 140,
      diastolic: 90
    }, {
      risklevel: "轻度",
      uploadTime: "2024-05-19 17:18:00",
      systolic: 140,
      diastolic: 90
    }, {
      risklevel: "中度",
      uploadTime: "2024-05-19 17:18:00",
      systolic: 140,
      diastolic: 90
    }, {
      risklevel: "重度",
      uploadTime: "2024-05-19 17:18:01",
      systolic: 140,
      diastolic: 90
    }]);
    function showStatus(status) {
      activeStatus.value = status;
    }
    function decideColor(risklevel) {
      switch (risklevel) {
        case "重度":
          return "#CC5557";
        case "中度":
          return "#F27E10";
        case "轻度":
          return "#E7A029";
        case "正常高值":
          return "#F1C226";
        case "偏低":
          return "#76A0D4";
        default:
          return "black";
      }
    }
    return (_ctx, _cache) => {
      return {
        a: common_vendor.n({
          active: activeStatus.value === "all"
        }),
        b: common_vendor.o(($event) => showStatus("all")),
        c: common_vendor.n({
          active: activeStatus.value === "重度"
        }),
        d: common_vendor.o(($event) => showStatus("重度")),
        e: common_vendor.n({
          active: activeStatus.value === "中度"
        }),
        f: common_vendor.o(($event) => showStatus("中度")),
        g: common_vendor.n({
          active: activeStatus.value === "轻度"
        }),
        h: common_vendor.o(($event) => showStatus("轻度")),
        i: common_vendor.n({
          active: activeStatus.value === "正常高值"
        }),
        j: common_vendor.o(($event) => showStatus("正常高值")),
        k: common_vendor.n({
          active: activeStatus.value === "偏低"
        }),
        l: common_vendor.o(($event) => showStatus("偏低")),
        m: common_vendor.f(abnormalBPLs.value, (abnormalBPL, index, i0) => {
          return {
            a: "2e5c2fae-0-" + i0,
            b: common_vendor.p({
              text: abnormalBPL.uploadTime
            }),
            c: common_vendor.t(abnormalBPL.systolic),
            d: common_vendor.t(abnormalBPL.diastolic),
            e: common_vendor.t(abnormalBPL.risklevel),
            f: decideColor(abnormalBPL.risklevel),
            g: activeStatus.value === "all" || activeStatus.value === abnormalBPL.risklevel,
            h: index
          };
        }),
        n: common_assets._imports_0$1
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2e5c2fae"]]);
wx.createPage(MiniProgramPage);
